import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";


type homeResult = {
  page: any;
  result: any
};

/** 新增行业应用字典 */
export const addXxiaotuController = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xxiaotuController/insertzd"), { data });
};

/** 删除行业应用字典 */
export const deleteXxiaotuController = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/xxiaotuController/delbyid/${userid}`));
};


/** 修改行业应用字典 */
export const updateXxiaotuController = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xxiaotuController/updatezd"), { data });
};


/** 分页查询 */
export const getXxiaotuController = (data?: object) => {
  return http.request<homeResult>("get", baseUrlApi("/xxiaotuController/selall"), { data });
};


/** 根据类型查询行业应用 */
export const xxiaotuControllerselect = (factoryId?: string) => {
  return http.request<homeResult>("get", baseUrlApi(`/xxiaotuController/select/${factoryId}`));
};

/** 行业应用存储 */
export const xxiaotuControllerupdate = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xxiaotuController/update"), { data });
};
